function attention(account,schoolNum){
	$.post("/xiaonei1227/Attention",{account1:account,schoolNum1:schoolNum},
	function(data){
		//alert(data)
	}
	)
	if($("#attention").val()=="取消"){
		$("#attention").val("关注")
	}else{
		$("#attention").val("取消")
	}

}

function reply(){
	
	document.getElementById("direct").innerHTML="<textarea name='direct'></textarea><input type ='submit'  value='回复'/>"
}


function comment(num){
	document.getElementById(num).innerHTML="<textarea name='content'></textarea><input type ='submit'  value='回复'/>"
}

function goodPost(account,postNum){
	//alert("goodPost"+postNum);
	$.post("/xiaonei1227/GoodOrBad",{account1:account,postNum1:postNum,type:1},
		function(data){
			var input="<input type='button' value='丢块砖' onclick=\"badPost('"+account+"','"+postNum+"')\"/>"
			var input1="<a href='#direct'><input type='button' value='回复' /></a>"
			$("#thegoodorbadofpost").html(input+input1)
		}
	)
	
}


function badPost(account,postNum){
	//alert("badPost"+postNum);
	$.post("/xiaonei1227/GoodOrBad",{account1:account,postNum1:postNum,type:-1},
		function(data){
			var input="<input type='button' value='赞一个' onclick=\"goodPost('"+account+"','"+postNum+"')\"/>"
			var input1="<a href='#direct'><input type='button' value='回复' /></a>"
			$("#thegoodorbadofpost").html(input+input1)
		}
	)
}

//传入的值也是正的
function goodDirect(account,postNum){//评论输入框中包含的id都是正数，通过direct或者indirect判断
	//alert("goodDirect"+postNum);
	postNum=-postNum
	$.post("/xiaonei1227/GoodOrBad",{account1:account,postNum1:postNum,type:1},
		function(data){
			postNum=-postNum//id是正的，数据库值是负的
			//alert(postNum)
			var input="<input type='button' value='丢块砖' onclick=\"badDirect('"+account+"','"+postNum+"')\"/>"
			var input1="<input type='button' value='回复 ' onclick=\"comment('direct"+postNum+"')\"/>"
			//alert(input)
			//alert(input1)
			$("#"+postNum).html(input+input1)
		}
	)
}


function badDirect(account,postNum){
	//alert("badDirect"+postNum);
	postNum=-postNum
	$.post("/xiaonei1227/GoodOrBad",{account1:account,postNum1:postNum,type:-1},
		function(data){
			postNum=-postNum//id是正的，数据库值是负的
			var input="<input type='button' value='赞一个' onclick=\"goodDirect('"+account+"','"+postNum+"')\"/>"
			var input1="<input type='button' value='回复 ' onclick=\"comment('direct"+postNum+"')\"/>"
			$("#"+postNum).html(input+input1)
		}
	)
}


function goodInDirect(id){
	alert("goodInDirect"+id);
}



function badInDirect(id){
	alert("badInDirect"+id);
}


